package com.lanou3g.myapplication.activity;

import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.lanou3g.myapplication.R;
import com.lanou3g.myapplication.activity.singleton.activity.BaseActivity;

/**
 * Created by dllo on 16/1/19.
 */
public class WeatherActivity extends BaseActivity {

    @Override
    protected int setLayout() {
        return R.layout.activity_weather;
    }

    @Override
    protected void initView() {
        WebView webView = (WebView) findViewById(R.id.weather_webview);
        webView.loadUrl("http://waptianqi.2345.com/dalian-54662.htm");
        WebSettings settings = webView.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setSupportZoom(true);
        settings.setBuiltInZoomControls(true);
        webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
    }

    @Override
    protected void initData() {

    }
}
